package com.lwq.project.utils.page;

public class Pages {
	/**
	 * 一页的条数
	 */
	private int pageSize = 10;
	
	
	/**
	 * 页码
	 */
	private int pageNumber = 1;
	
	
	/**
	 * 总页数
	 */
	private int pageCount;
	
	/**
	 * 数据库查询从第几条开始
	 */
	private int pageBegin;
	
	
	/**
	 * 数据库查询到第几条
	 */
	private int pageEnd;
	
	
	/**
	 * 总共有多少条数据
	 */
	private int numberCount;
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageNumber() {
		return pageNumber;
	}
	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}
	public int getPageCount() {
		pageCount =numberCount%pageSize==0?numberCount/pageSize:numberCount/pageSize + 1;
		return pageCount;
	}
	public int getPageBegin() {
		pageBegin = pageSize * (pageNumber - 1);
		return pageBegin;
	}
	public int getNumberCount() {
		return numberCount;
	}
	public int getPageEnd() {
		pageEnd = pageSize * pageNumber;
		return pageEnd;
	}
	public void setNumberCount(int numberCount) {
		this.numberCount = numberCount;
	}
}
